﻿<UserControl x:Class="P2.Cuberry.Modules.Framework.WPFCharting.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:P2.Cuberry.Modules.Framework.WPFCharting"
    xmlns:delay="clr-namespace:Delay">

        <Grid>
            <Grid.Resources>
                <Style x:Key="HyperlinkStyle" TargetType="TextBlock">
                    <Setter Property="Foreground" Value="Blue"/>
                    <Setter Property="TextDecorations" Value="Underline"/>
                    <Setter Property="Cursor" Value="Hand"/>
                </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <!-- A selectable list of samples -->
            <ListBox
            ItemsSource="{Binding}"
            DisplayMemberPath="Title"
            SelectionChanged="ListBox_SelectionChanged"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <local:WrapPanel/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemContainerStyle>
                    <Style TargetType="ListBoxItem">
                        <!-- Work around Silverlight's lack of support for Setter/Value/Binding -->
                        <Setter
                        Property="delay:SetterValueBindingHelper.PropertyBinding">
                            <Setter.Value>
                                <delay:SetterValueBindingHelper
                                Property="Background"
                                Binding="{Binding Background}"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Margin" Value="3 2 3 2"/>
                        <Setter Property="Padding" Value="2"/>
                        <Setter Property="FontWeight" Value="Bold"/>
                    </Style>
                </ListBox.ItemContainerStyle>
            </ListBox>

            <!-- Container for samples -->
            <Grid
            x:Name="SampleContainer"
            Grid.Row="1"/>

            <!-- Footer with blog link -->
            
        </Grid>
    </UserControl>
